package com.jz.netthings.analysis.controller;


import com.jz.netthings.analysis.service.ProviderRoundBaseService;
import com.jz.netthings.exception.AdscmSystemException;
import com.jz.netthings.support.SimpleCoreResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 轮次标准时间表 前端控制器
 * </p>
 *
 * @author yangyunyun
 * @since 2019-07-16
 */
@RestController
@RequestMapping("/adscm/analysis/roundsBase")
public class RoundsBaseController {

    @Autowired
    ProviderRoundBaseService providerRoundBaseService;

    /**
     * 查询某个村落某天登记的所有浆员的轮次表
     * @param villageName 村落名称
     * @param date 登记日期
     * @param isNew 是否新浆员
     * @param isPositive 是否积极浆员
     * @return
     * @throws AdscmSystemException
     */
    @RequestMapping("/getRegProviderRound")
    public SimpleCoreResponse getRegProviderRound(String villageName,String date,boolean isNew, boolean isPositive) throws AdscmSystemException {

        return new SimpleCoreResponse("200", "查询成功", providerRoundBaseService.getRegProviderRound(villageName,date,isNew,isPositive));
    }
    /**
     * 查询某个村落某个类型的浆员的轮次信息
     * @param villageName 村落名称
     * @param providerType 浆员类型 ：所有浆员、今年已进站浆员......
     * @return
     * @throws AdscmSystemException
     */
    @RequestMapping("/getProviderRound")
    public SimpleCoreResponse getProviderRound(String villageName,String providerType,int currentPage,int size) throws AdscmSystemException {

        return new SimpleCoreResponse("200", "查询成功", providerRoundBaseService.getProviderRound(villageName,providerType,currentPage,size));
    }




}

